package com.j2eefast.bussiness.contract.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * <p>合同</p>
 *
 * @author: zhangyuan
 * @date: 2021-04-29 14:41
 * @web: http://www.letukeji.cn
 * @version: 1.0.1
 */
@Data
@TableName("business_contract")
public class ContractEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ExcelIgnore
    protected Integer id;
    //合同标题
    @TableField(value = "title")
    @ExcelProperty(value = "合同标题",index = 1)
    protected String title;
    //合同编号
    @TableField(value = "contract_sn")
    @ExcelProperty(value = "合同编号",index = 0)
    protected String contractSn;
    //签订公司
    @TableField(value = "company")
    @ExcelProperty(value = "签订公司",index = 2)
    protected String company;
    //合同金额
    @TableField(value = "money")
    @ExcelProperty(value = "合同金额",index = 6)
    protected BigDecimal money;
    //业务员
    @TableField(value = "user_id")
    @ExcelIgnore
    protected Long userId;
    //合同支付状态
    @TableField(value = "pay_type")
    @ExcelProperty(value = "合同支付状态",index = 7)
    protected Integer payType;
    //合同类型
    @TableField(value = "type")
    @ExcelProperty(value = "合同类型",index = 4)
    protected Integer type;
    //合同状态
    @TableField(value = "status")
    @ExcelProperty(value = "合同状态",index = 5)
    protected Integer status;
    //合同说明
    @TableField(value = "memo")
    @ExcelProperty(value = "合同说明",index = 3)
    protected String memo;
    //业务员
    @TableField(value = "saleman")
    @ExcelProperty(value = "业务员",index = 8)
    protected String saleman;
    //合同签订日期
    @TableField(value = "sign_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ExcelProperty(value = "合同签订日期",index = 9)
    protected Date signTime;
    //合同开始日期
    @TableField(value = "start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ExcelProperty(value = "合同开始日期",index = 10)
    protected Date startTime;
    //合同结束日期
    @TableField(value = "end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ExcelProperty(value = "合同结束日期",index = 11)
    protected Date endTime;
    //上传时间
    @TableField(value = "dateline")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ExcelProperty(value = "上传时间",index = 12)
    protected Date dateline;
    //删除标识
    @TableField(value = "del_flag")
    @ExcelIgnore
    protected Integer delFlag;

    @Override
    public String toString() {
        return super.toString();
    }
}
